﻿using System.Windows;
using System.Windows.Controls;

namespace Waaahsabi.Controls.TheGame
{
	public class GenericLogItem : Control
	{
		#region LogTimestamp DependencyProperty
		public static readonly DependencyProperty LogTimestampProperty =
		DependencyProperty.Register
			(
			"LogTimestamp",
			typeof(string),
			typeof(GenericLogItem),
			new PropertyMetadata(null)
			);

		public string LogTimestamp
		{
			get { return (string)GetValue(LogTimestampProperty); }
			set { SetValue(LogTimestampProperty, value); }
		}
		#endregion

		#region LogSourceIP DependencyProperty
		public static readonly DependencyProperty LogSourceIPProperty =
		DependencyProperty.Register
			(
			"LogSourceIP",
			typeof(string),
			typeof(GenericLogItem),
			new PropertyMetadata("-- N0 S0URCE --")
			);

		public string LogSourceIP
		{
			get { return (string)GetValue(LogSourceIPProperty); }
			set { SetValue(LogSourceIPProperty, value); }
		}
		#endregion

		#region LogAction DependencyProperty
		public static readonly DependencyProperty LogActionProperty =
		DependencyProperty.Register
			(
			"LogAction",
			typeof(string),
			typeof(GenericLogItem),
			new PropertyMetadata("-- N0 ACTI0N --")
			);

		public string LogAction
		{
			get { return (string)GetValue(LogActionProperty); }
			set { SetValue(LogActionProperty, value); }
		}
		#endregion

		#region LogAffectedItem DependencyProperty
		public static readonly DependencyProperty LogAffectedItemProperty =
		DependencyProperty.Register
			(
			"LogAffectedItem",
			typeof(string),
			typeof(GenericLogItem),
			new PropertyMetadata("-- N0 AFFECTED ITEM --")
			);

		public string LogAffectedItem
		{
			get { return (string)GetValue(LogAffectedItemProperty); }
			set { SetValue(LogAffectedItemProperty, value); }
		}
		#endregion

		public ulong LogId { get; set; }

		public GenericLogItem()
		{
			DefaultStyleKey = typeof(GenericLogItem);
		}
	}
}
